package com.sskj.api.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sskj.api.domain.Department;
import com.sskj.common.dto.TreeNode;

import java.util.List;

public interface IDepartmentService extends IService<Department> {

    /**
     * 新增
     * @param department 实例
     */
    void add(Department department);

    /**
     * 删除
     * @param id 部门id
     */
    void deleteById(Long id);

    /**
     * 更新
     * @param department 实例
     */
    void update(Department department);

    /**
     * 部门列表
     * @return 树形结构
     */
    List<TreeNode<Department>> tree();
}
